#ifndef __HERO_H__
#define __HERO_H__
#include "vector2.h"
extern int skilltimer;
extern int curetimer;
extern int estimer;
enum HeroType {
	herot1=1,
	herot2,
	herot3
};

//enum HeroType heroType;
typedef struct HeroST{
	struct V2s pos;
	int maxlife;
	int attack;
	float attackSpeed;
	float coldtime;
	int type;
	int moveSpeed;
	int curlife;
	int dir;
	int coin;
	int level;
	int exp;
	int defense;
	float boomAttack;
	int attackRange;
	char info[30];
	char draw[10];
	char name[20];
} HeroS;
struct Hero{
	HeroS heros;
	HeroS (*_init)(int x,int y,int dir,int type,char name[20]);
	void (*_show)(HeroS *hero,HeroS *enemy);
} ;

struct Hero player;
struct Hero enemy;
extern HeroS _initf(int posx,int posy,int dir,int type,char name[20]);
extern void _showf(HeroS *player,HeroS *enemy);
extern void showHero(struct V2s v2s,const char *str);
extern void showHeros(HeroS *player,HeroS *enemy);
extern void showHerosWithConsole(HeroS *player,HeroS *enemy);
extern int isInAtRange(HeroS orgHero,struct V2s otherV2s);
extern void getPosByDir(struct V2s *v2s,int dir,int range);
extern void showHeroAttackRange(HeroS heroS,char rangeStr[4]);
extern void* showRtHome(void * rtArgs);
extern void attack(HeroS player,HeroS other);
extern void extraSkill(struct Hero *hero);
extern char heroCtrl(struct Hero * hero, int input);
extern void initPlayer(int type);
extern void initEnemy(int type);
extern void initHeros(int ptype);

extern struct Hero _hero;
#endif
